#ifndef THINK_THINK_EXCEPTION_DBEXCEPTION_H
#define THINK_THINK_EXCEPTION_DBEXCEPTION_H

static char* think_exception_dbexception =
	"\n"
	"// +----------------------------------------------------------------------\n"
	"// | ThinkPHP [ WE CAN DO IT JUST THINK ]\n"
	"// +----------------------------------------------------------------------\n"
	"// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.\n"
	"// +----------------------------------------------------------------------\n"
	"// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )\n"
	"// +----------------------------------------------------------------------\n"
	"// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn>\n"
	"// +----------------------------------------------------------------------\n"
	"\n"
	"namespace think\\exception;\n"
	"\n"
	"use think\\Exception;\n"
	"\n"
	"/**\n"
	" * Database相关异常处理类\n"
	" */\n"
	"class DbException extends Exception\n"
	"{\n"
	"    /**\n"
	"     * DbException constructor.\n"
	"     * @param string    $message\n"
	"     * @param array     $config\n"
	"     * @param string    $sql\n"
	"     * @param int       $code\n"
	"     */\n"
	"    public function __construct($message, array $config, $sql, $code = 10500)\n"
	"    {\n"
	"        $this->message = $message;\n"
	"        $this->code    = $code;\n"
	"\n"
	"        $this->setData(\'Database Status\', [\n"
	"            \'Error Code\'    => $code,\n"
	"            \'Error Message\' => $message,\n"
	"            \'Error SQL\'     => $sql,\n"
	"        ]);\n"
	"\n"
	"        unset($config[\'username\'], $config[\'password\']);\n"
	"        $this->setData(\'Database Config\', $config);\n"
	"    }\n"
	"\n"
	"}\n"
	"\n"
;
#endif